package cn.model;

import cn.util.Toolsutil;

import java.sql.Timestamp;

public class TClassRoom {
    private int classroomid;
    private String roomName;
    private String roomtype;
    private String createtime;
    private int state;
    private String description;

    public int getClassroomid() {
        return classroomid;
    }

    public void setClassroomid(int classroomid) {
        this.classroomid = classroomid;
    }

    public String getRoomName() {
        return roomName;
    }

    public void setRoomName(String roomName) {
        this.roomName = roomName;
    }

    public String getRoomtype() {
        return roomtype;
    }

    public void setRoomtype(String roomtype) {
        this.roomtype = roomtype;
    }

    public String getCreatetime() {
        return Toolsutil.GetDateFormat(createtime);
    }

    public void setCreatetime(String createtime) {
        this.createtime = createtime;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TClassRoom that = (TClassRoom) o;

        if (classroomid != that.classroomid) return false;
        if (state != that.state) return false;
        if (roomName != null ? !roomName.equals(that.roomName) : that.roomName != null) return false;
        if (roomtype != null ? !roomtype.equals(that.roomtype) : that.roomtype != null) return false;
        if (createtime != null ? !createtime.equals(that.createtime) : that.createtime != null) return false;
        if (description != null ? !description.equals(that.description) : that.description != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = classroomid;
        result = 31 * result + (roomName != null ? roomName.hashCode() : 0);
        result = 31 * result + (roomtype != null ? roomtype.hashCode() : 0);
        result = 31 * result + (createtime != null ? createtime.hashCode() : 0);
        result = 31 * result + state;
        result = 31 * result + (description != null ? description.hashCode() : 0);
        return result;
    }
}
